package com.since.data_structure.hash;

import com.since.data_structure.hash.HashTable.HashLinkedListNode;

/**
 * Created by Sincerity on 2020/5/16.
 * 描述：
 */
class HashTableTest {
    public static void main(String[] args) {
        HashTable table = new HashTable(20);
        HashLinkedListNode node = new HashLinkedListNode(1, "大白");
        HashLinkedListNode node2 = new HashLinkedListNode(7, "大黑");
        HashLinkedListNode node3 = new HashLinkedListNode(56, "蓝猫");
        HashLinkedListNode node4 = new HashLinkedListNode(77, "淘气");
        HashLinkedListNode node5 = new HashLinkedListNode(15, "三千");
        HashLinkedListNode node6 = new HashLinkedListNode(155, "美羊羊");
        table.add(node);
        table.add(node2);
        table.add(node3);
        table.add(node4);
        table.add(node5);
        table.add(node6);
        table.show();
        System.out.print("查找元素");
        HashLinkedListNode getNode = table.get(115);
        System.out.print("查到的元素是" + getNode);
        System.out.println("删除元素");
        int delete = table.delete(155);
        System.out.println("删除元素的结果" + delete);
        table.show();

    }
}
